# 该镜像需要依赖的基础镜像
FROM storage-image.tencentcloudcr.com/public_images/openjdk:8

VOLUME /tmp
RUN mkdir -p /opt/pdf
RUN mkdir -p /opt/fonts
RUN mkdir -p /opt/statics

COPY src/main/resources/fonts /opt/fonts
COPY src/main/resources/static /opt/statics
# 将当前目录下的jar包复制到docker容器的/目录下
ADD target/tsingdao-1.0-SNAPSHOT.jar /opt/tsingdao-1.0-SNAPSHOT.jar
# ADD src/main/resources/application.yml /opt/conf/application.yml


# 声明服务运行在8880端口
EXPOSE 9001
EXPOSE 5005
# 指定docker容器启动时运行jar包
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Duser.timezone=Asia/Shanghai","-jar","/opt/tsingdao-1.0-SNAPSHOT.jar", "-Xdebug","-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005","-Dspring.config.location=/opt/conf/application-prod.yml"]
